configuration I2CDispatcherC {
	provides {
		interface StdControl;
	}
//	uses {
//	}
}

implementation {
	components I2CDispatcherP, Atm128I2CSlaveByteC, LedsC;
	StdControl = I2CDispatcherP;
	I2CDispatcherP.Leds -> LedsC;
	I2CDispatcherP.I2CSlave -> Atm128I2CSlaveByteC;
	I2CDispatcherP.I2CControl -> Atm128I2CSlaveByteC;


//	components Timer1PWMC;
//	components new TimerMilliC() as TowerTimerC;
	components new TimerMilliC() as SensorTimerC;
	components new TimerMilliC() as LightTimerC;
	components TowerBarrelC;
	components TowerShootC;

//	I2CDispatcherP.TowerMotor -> Timer1PWMC.Motor1;
//	I2CDispatcherP.TowerTimer -> TowerTimerC;
	components TowerRotateC;
	I2CDispatcherP.TowerRotate -> TowerRotateC;

	I2CDispatcherP.SensorTimer -> SensorTimerC;
	I2CDispatcherP.LightTimer -> LightTimerC;

	I2CDispatcherP.BarrelUpDown -> TowerBarrelC;
	I2CDispatcherP.Shoot -> TowerShootC;
	
	components new LightSensorC();
	I2CDispatcherP.Sensor -> LightSensorC;

	components OutputC;
	I2CDispatcherP.Output -> OutputC;

	components new TimerMilliC() as TopLedTimerC;
	I2CDispatcherP.TopLedTimer -> TopLedTimerC;
	components HplAtm128GeneralIOC as GPIO;
	I2CDispatcherP.TopLed -> GPIO.PortC3;

}
